<?php
 error_reporting(E_ALL); 
 set_time_limit(0); 
 
 //echo "\n====== Starting thread 1 ======\n";

 if (empty($_SERVER['DOCUMENT_ROOT']) == true)
 {
	$_SERVER['DOCUMENT_ROOT'] = '/var/www/sigserv';
 }
 
 //подготовка
  
 set_include_path(  get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] . '/lib');
 
 require_once('Zend/Registry.php');
 require_once('Zend/Loader/Autoloader.php');
 require_once('Rediska.php');
 
 require_once('Signalsy/Exceptions.php');
 
 $loader = Zend_Loader_Autoloader::getInstance();

 $loader->registerNamespace('Signalsy');

 $config = parse_ini_file('config.ini', TRUE);
 
 
 //поправка для timezone
 date_default_timezone_set($config['Default']['use_default_timezone']);
 
 $sigQ = Signalsy_MQ::getInstance();
 
 $sigQ->getRediska()->flushDb(true);
 $sigQ->getRediska()->save(true);
 
 echo "OK\n";